Greetings,
I have a K-Step with closed loop feedback. I am trying to write a program that will home an axis by running it into a hard stop, and using encoder error to tell me I have hit the stop and then zero the axis.
I am struggling to find the function that tells me what the current error is on a particular axis. Here is what I am trying:
ch0->MaxFollowingError=500; //Set a high following error value
Jog(0,1000); //Slowly jog axis towards limit
while(FollowingError < 10); //Jog until following error
Jog(0,0); // stop
while (!CheckDone(0)) ; // loop until motion completes
DisableAxis(0); // disable the axis
Zero(0); // Zero the position
EnableAxis(0); // re-enable the ServoTick
ch0->MaxFollowingError=50; // Set normal error limit
Is there a function like "FollowingError(CH(0))" in "KMotionDef.h"? I would really appreciate any help on this, probably a simple thing I am missing.
Thanks,
Scott